/**
 * Created by Administrator on 2017/7/25.
 */

/**function Point(x, y) {
    this.x = x;
    this.y = y;
}

 Point.prototype.toString = function () {
    return '(' + this.x + ', ' + this.y + ')';
};

 var p = new Point(1, 2);
 console.log(p,p.toString());*/



 class Point {
    constructor(x, y) {
        this.x = x;
        this.y = y;
    }

    toString() {
        return '(' + this.x + ', ' + this.y + ')';
    }
}

 var p = new Point(1, 2);
 console.log(p, p.toString());


console.log(Point.prototype.constructor);